﻿Imports Microsoft.Xna.Framework
Imports Runa.UI.Controls

Namespace Global.Runa.UI.Metadata

    Public Class SizeModeConverter
        Inherits TypeConverter

        Public Sub New(g As Game)
            MyBase.New(g)
        End Sub

        Public Overrides Function ConvertFromInvariantString(text As String) As Object
#If WINDOWS_PHONE Then
            Return System.Enum.Parse(GetType(SizeMode), text, True)
#Else
            Return System.Enum.Parse(GetType(SizeMode), text)
#End If
        End Function

        Public Overrides Function ConvertFromString(text As String) As Object
            Return Me.ConvertFromInvariantString(text)
        End Function

    End Class

End Namespace